function fun(list,month){
  let income=0
  let pay=0
  list.forEach(item=>{
    if((new Date(item.leveTime).getMonth()+1)===month){
      income+=item.income
      pay+=item.pay
    }
  })
  return {income,pay}
}

function fun1(list,month){
  let rst=[]
  while(month){
    rst.push(fun(list,month))
    month--
  }
  return rst
}